package com.testapp.bluetoothtest08.File;

import org.apache.commons.codec.binary.Hex;
import org.apache.commons.codec.digest.DigestUtils;

public class MD5 {
    // 带秘钥加密
    public static String md5(String text, String key) throws Exception {

        String md5str = new String(Hex.encodeHex(DigestUtils.md5(text+key)));
        return md5str;
    }
}
